package com.aic.aicdetactor.broadcast;

import android.content.Context;
import android.content.Intent;

import com.aic.aicdetactor.util.ToastUtil;

public class EvalBroadcastReceiver extends BaseReceiver {
	
	private static final String TAG = EvalBroadcastReceiver.class.getSimpleName();
	
	public EvalBroadcastReceiver() {
	}

	@Override
	public void onReceive(Context context, Intent intent) {
		// TODO: This method is called when the BroadcastReceiver is receiving
		// an Intent broadcast.
		ACTION = Keys.EVALUE_ACTION;
		KEY = Keys.eKey;
		if(null != intent.getAction()){
			if(ACTION.equals(intent.getAction())){	//匹配broadcast的action名称
				if(intent.getStringExtra(KEY) != null && !"".equals(intent.getStringExtra(KEY))){
					receivedData = intent.getStringExtra(KEY);
					ToastUtil.showToast(context, "有效值：" + receivedData);
				}
			}
		}
	}
}
